﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GQ.Utils.TreeNode;
using GQ.Utils;
using Chili.Opf3;

namespace GQ.BLL.QuanLyKho
{
    public partial class PhongBan:INode
    {

        ObjectSet<PhongBan> _childs = null;
        public ObjectSet<PhongBan> Childs
        {
            get
            {
                if (_childs == null)
                {
                    _childs = DbContext.ObjectContext.GetObjectSet<PhongBan>("PhongBanChaID={0} Sortby Stt", this.ID);

                }
                return _childs;
            }
        }


        #region INode Members

        string INode.Text
        {
            get { return Ten; }
        }

        private NodeCollection _nodes;

        NodeCollection INode.Children
        {
            get
            {
                if (_nodes == null)
                {
                    _nodes = new NodeCollection(this, this.Childs);
                }
                return _nodes;
            }
        }

        int INode.ImageIndex
        {
            get { return -1; }
        }

        int INode.SelectedImageIndex
        {
            get { return 0; }
        }

        #endregion
    }
}
